Aligning rectilinear images in 3D through projective registration and calibration

ABSTRACT

An improved apparatus and method for creating high quality virtual reality panoramas is disclosed that yields dramatic improvements during the authoring and projecting cycles, with speeds up to several orders of magnitude faster than prior systems. In a preferred embodiment, a series of rectilinear images taken from a plurality of rows are pairwise registered with one another, and locally optimized using a pairwise objective function (local error function) that minimizes certain parameters in a projective transformation, using an improved iterative procedure. The local error function values for the pairwise registrations are then saved and used to construct a quadratic surface to approximate a global optimization function (global error function). The chain rule is used to avoid the direct evaluation of the global objective function, saving computation. In one embodiment concerning the blending aspect of the present invention, an improved procedure is described that relies on Laplacian and Gaussian pyramids, using a blend mask whose boundaries are determined by the grassfire transform. An improved iterative procedure is disclosed for the blending that also determines at what level of the pyramid to perform blending, and results in low frequency image components being blended over a wider region and high frequency components being blended over a narrower region. Human interaction and input is also provided to allow manual projective registration, initial calibration and feedback in the selection of photos and convergence of the system.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application, Ser. No. 09/160,822, is co-pending with commonly assigned utility patent application Ser. No. 09/160,823, filed on Sep. 25, 1998, entitled “Blending Arbitrary Overlaying Images into Panoramas”.

BACKGROUND OF THE INVENTION

1. Field of Invention

The present invention relates generally to an improved system for creating a full 360-degree virtual reality panorama from rectilinear images.

A panorama is a compact representation of the environment viewed from a 3D position. While an ordinary image can capture only a small portion of the environment, a panorama can capture it all, or any portion of it, depending on the geometry in which the panoramas are represented. Recently there has been an explosive popularity of panoramas on the world wide web and in multimedia as an effective tool to present a photo-realistic virtual reality. However, creating high-quality panoramas, especially those that completely enclose space, has been difficult.

2. Description of Related Art

Various systems have been proposed for simulating a virtual reality environment using photographic quality images. Many virtual reality environments use 3D models or mathematical equations to create a simulated world. The user explores this simulation in real time. Though 3D modeling via equations has certain advantages, such as a depiction of a scene from any arbitrary vantage point, creating images from equations generated by a computer is seriously limited by the speed of the computer. To avoid this problem, technology such as QuickTime™ VR from Apple Corporation uses images that have already been produced, either photographically or generated by a 3D modeling program, and stored in secondary memory. Software only has to read the image files from a disk and display the scene as needed, rather than calculating the scene from mathematical models. However, a limitation of the QuickTime™ VR program is that it requires that the view direction for all photos reside in a single plane, such as that obtained by rotating a camera on a tripod. It also requires that the vertical field of view (or equivalently, the focal length) be known, and that there be roughly equal angular increments between one photo and the next.

Further, a panoramic movie or image can be created using specialized hardware, such as with a panoramic camera or a fisheye lens camera. However, such hardware is inconvenient for the average novice photographer. In the alternative, software can be used to simulate a panorama. This obviates the need for specialized hardware.

Though various software programs have been proposed to simulate panoramas without the use of special hardware, these programs have certain serious drawbacks that have not been successfully overcome to date. These include, but are not limited to, unrealistic representations of images, lack of proper registration and calibration of images, lack of proper blending of images, and slow speed in registering, calibrating and blending images to create a panorama.

SUMMARY OF THE INVENTION

Accordingly, one aspect of the present invention is to provide an improved system and method for overcoming the drawbacks of prior techniques discussed above.

Another aspect of the present invention is to provide for the registration, calibration and global optimization of images, preferably captured from a substantially single nodal position. The solution to creating a full 360-degree panorama quickly and seamlessly is divided into three steps. The first step registers all overlapping images projectively. A combination of a gradient-based optimization method and a correlation-based linear search has proved to be robust in cases of drastic exposure differences and small amount of parallax. The second step takes the projective matrices and their associated Hessian matrices as inputs, and calibrates the internal and external parameters of every image through a global optimization. The objective is to minimize the overall image discrepancies in all overlap regions while converting projective matrices into camera parameters such as focal length, aspect ratio, image center, 3D orientation and the like. Improved techniques for global optimization are disclosed that give order of magnitude improvements over prior systems of optimization. The third step re-projects all images onto a panorama by a method employing Laplacian-pyramid based blending using a Gaussian blend mask generated by the grassfire transform. The purpose of the blending is to provide a smooth transition between images and eliminate small residues of misalignments resulting from parallax or imperfect pairwise registrations. The invention further provides for human interaction, where necessary, for initialization, feedback and manual options.

Further, the present invention, unlike some of the prior art, allows for multiple views, from multiple planes and rows of images, and allows for the arbitrary orientation of photographic images to be constructed into a panorama, without specialized hardware such as a tripod or fisheye lens. In addition, the present system and method can be several orders of magnitude faster than the prior art.

The numerous aspects of the invention described herein result in a system for registration, calibration and blending that creates high quality panoramas from rectilinear images that is up to several orders of magnitude faster than prior systems. In one calculation, the present invention is up to 100,000 times faster than prior techniques. As a consequence, the present invention could be used to construct panoramas much quicker than previous methods. These panoramas can be used in applications where real-time image rendering is important, such as in real-time 3D virtual reality, the construction of background images, computer animation, multimedia, and the like.

The above described and many other features and attendant advantages of the present invention will become apparent from a consideration of the following detailed description when considered in conjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

Detailed description of preferred embodiments of the invention will be made with reference to the accompanying drawings.

FIGS. 1(a) and 1(b) is an artists rendition of a composite photograph before and after the application of the present invention.

FIG. 2 is a generalized flowchart of the various function modules comprising one embodiment of the present invention.

FIG. 3 is a generalized flowchart of the method of operation of the Pairwise Registration function module of one embodiment of the present invention.

FIG. 4 is a generalized flowchart for the method of operation of the Calibration and Global Optimization function module of one embodiment of the present invention.

FIG. 5 is a generalized flowchart for the method of operation of the blending function module of one embodiment of the present invention.

FIG. 6 is a screen shot of a user interface dialog window for the user interface of one embodiment of the present invention.

FIG. 7 is a conceptual illustration on the problem of finding the proper Laplacian pyramid level using the minor axis of an inertial ellipse.

FIG. 8 is a graphical illustration of the transition lengths for different frequency image components (low, middle and high) used in one embodiment of the blending function module of the present invention.

FIG. 9 conceptually illustrates the weighted average method for blending.

FIGS. 10(a) and (b) illustrate the blend mask used for blending two images during the blending phase of one embodiment of the present invention.

FIGS. 11(a) and (b) illustrate a particular problem overcome during blending in one embodiment of the present invention.

FIG. 12 illustrates a particular virtual reality orientation of images for the user interface for one embodiment of the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Disclosed herein is a detailed description of the best presently known mode of carrying out the invention. This description is not to be taken in a limiting sense, but is made merely for the purpose of illustrating the general principles of the invention. The section titles and overall organization of the present detailed description are for the purpose of convenience only and are not intended to limit the present invention.

Turning to FIG. 1, there is shown a simulation of different overlapping rectilinear images, or 2D photographs, framed by dashed lines during the authoring portion of the present invention, as indicated by dashed lines 110. Where the images overlap there is potential for misalignment when constructing a 3D panorama, as indicated by blurry lines 112, for a variety of reasons, including the arbitrary position of the camera, errors in internal and external camera parameters, and, distortions that occur when warping a 2D image to construct a 3D image space. The present invention is designed to calibrate and align all such 2D rectilinear images with respect to one another and globally, blend the images where they overlap, and construct a reconstructed and relatively error free 3D panorama image, shown conceptually in 2D form as FIG. 1(b), for any arbitrary geometry.

FIG. 2 discloses a generalized flowchart for overall operation of the invention. The invention is part of a system 210 comprising a computer, having all necessary hardware, such as processing unit 212, e.g., a G3 microprocessor chip; I/O 214, such as a keyboard 216, video monitor 218, and mouse 217; memory 220, which may be any sort of memory buffer, preferably primary memory, e.g. RAM, that can be cached to secondary memory, such as a hard drive. The system 210 is controlled by a program residing in system memory 220, which also stores output data and other data. The program is preferably written in the C or C++ language, using classes, structures, functions, calls, translation units, headers, subroutines, modules, and other features of structured programming, where appropriate, of both data and source code, suitably compiled and in executable form, in accordance with the teachings of the present disclosure to practice the invention. The present invention is also suitable for implementation with an interpreted language such as Java.

In constructing a panorama from rectilinear images, the system finds solutions to three sub-problems: (1) the projective registrations of overlapping images (shown as the “local pairwise registration” box 222 in FIG. 2), (2) calibration and global optimization of these images, a self-calibration in which 2D image planes are positioned as 3D planes in space (shown as the “calibration and global optimization” box 224 in FIG. 2), and (3) the composing or blending problem in which images are ready to be reprojected to a 3D environment map with pixels in overlap regions being composed from multiple images, to smooth any transitional discontinuities (shown as the “blending” box 226 in FIG. 2). Finally, there is the projection or construction of the assembled panorama onto a 3D geometry surface, such as a cylinder, cube or sphere (defined as the “projection” box 228 in FIG. 2).

The solutions to these sub-problems are performed by software function modules 222, 224, 226, 228 residing in memory 220 and operating the processor 212. The modules are designated, as explained further herein, the pairwise registration function module 222, the calibration and global optimization function module 224, the blending function module 226, and the projection function module 228. A user interface module 230, also residing in memory 220, may interact with the other modules to pass data to and from the modules, and accept input from a human user of the system. The modules may receive data from memory, manipulate that data as described herein, and output the data to other modules. The three modules 222, 224 and 226 may perform feedback to pass data back to previous modules, as indicated by arrows 233, and as described below. Although in a preferred embodiment the modules are programmed as separate software routines or classes, the modules may be combined into one module performing all the designated tasks performed by separate modules.

As a final step, the fourth module, the projection function module 228, constructs a panoramic scene by projecting the blended image onto any designated geometry view surface, typically a cubic, polyhedral, cylindrical or spherical surface. The projection module may be controlled through the user interface 230 as well, to allow a user to select what geometry will be projected onto and to control and modify other factors, including the use of photo re-touching software such as PhotoShop™ for modifying the final panorama.

Generally, the local registration, self-calibration and global optimization, and blending involve a multi-step procedure.

First, regarding the initial local registration, and referring generally to the generalized flowchart of FIG. 3, the system 210 reads in each overlapping rectilinear image into main memory 220, as indicated by step 312. The images are assumed to roughly share a common nodal point (i.e., that point in the three-space where all rays of light converge through a lens) with other overlapping rectilinear images. The object of the program during local registration is to register the locally overlapping images, by comparing common overlapping areas between overlapping images at certain predetermined resolution levels on a Gaussian pyramid representing the overlapped images. Different combinations of overlapping areas are tried to achieve the optimal overlap between images (or, equivalently, the smallest error in the error function or pairwise objective function described herein) using the steps described herein, which generally minimizes the average squared pixel intensity (e.g., brightness and contrast) difference with respect to certain transformation parameters. Initial values for parameters used in optimizing the pairwise objective function are assumed by the computer, as indicated in step 314. The initial values may optionally be input by a user, e.g., with a user interface 230 as in FIG. 2, and in response to a user dialog window such as of the kind shown in FIG. 6. Besides the global orientation (pan, tilt and roll) the other parameters that are most likely to give instability in convergence of the error function are bad initial estimates of the brightness and contrast, as well as of the geometric image center of projection of the overlapping rectilinear images. Certain parameters most likely to create instability in the convergence of the local error functions can be controlled (e.g., progressively dampened at different levels of the Gaussian pyramid) to ensure convergence, as indicated by step 318. The overlapping images are then perturbed and the local error function with respect to these and other variables is calculated until a minimal local error function is found, as indicated by step 320. The minimal local error function is then stored for a particular level of the Gaussian pyramid, as indicated in step 322, for each pairwise registration, and is saved and later used to compute a global error function for all the overlapping images. The local pairwise registration module 222 iterates until the entire Gaussian pyramid is traversed, starting from the coarsest level of the pyramid (sometimes called the bottom, where the pyramid can be standing on its inverted top) and working to the finest level resolution, as indicated in decision box 324. It should be noted that at any stage throughout the registration, and throughout the invention in general, the system may check for a user interruption, through the user interface, that would require immediate attention from the processor, such as to allow the user to interactively adjust the parameters to avoid divergence or convergence to an undesired local minimum.

As indicated in box 316 of FIG. 3, it must be determined at what level in the Gaussian pyramid to start the local pairwise registration. One way to find the lowest level is to select the resolution level at which it is found that the images share at least some arbitrary number of overlapping pixels, e.g., preferably about 30 pixels from each side, e.g., preferably no less than 30 pixels across the overlapping area. If greater than 60 pixels of overlap is found in these areas, the size (resolution) of the overlap region is decreased by half (going deeper into the pyramid) and the procedure of the present invention is reiterated again. If, on the other hand, the overlap is less than 30 pixels, then the size (resolution) of the overlap region is increased by doubling. By utilizing multi-resolution registration of overlapping images by way of the Gaussian pyramid, convergence to the desired optimum is accelerated, and false local minima are avoided.

On occasion, it may be visually apparent to a user that during registration the images are not converging optimally. In this case user input may manually abort the pairwise registration procedure, and the user may manually help align the images closer before resuming automatic registration, as before. This manual intervention is true for all aspects of the invention. Nevertheless, the present invention is surprisingly robust, and manual intervention is not a prerequisite for the invention to work.

Non-optimal convergence or divergence has sometimes been found to be the case whenever images for a spherical projection are used, especially those in the “pole” regions of the sphere (though in general the invention can adjust quite nicely for images that wrap around the poles). Divergence sometimes results when the initial default parameters chosen are wildly off or not suitable for convergence. During such instability, the images will appear to a user to “run away” from each other. In this case, and throughout the invention, provision may be provided in the user interface 230 of the embodiment of FIG. 2 of the present invention for manual intervention, such as to abort the program, for the manual selection and relative positioning of the images to be pairwise registered, and for the selection and relative positioning of overlapping images for blending.

The iterative method of moving down a pyramid when an overlap region is greater than, say, 30 pixels, is an attempt to prevent instability in the error function due to problematic parameters, such as initial value errors in the image center of projection of the images being registered, and errors in setting initial brightness and contrast values. Techniques of damping and annealing of problematic parameters (with damping progressively diminished and finally set to zero as one moves up the pyramid to finer levels) can be used to stabilize the local error function for these problematic terms, as explained further herein.

One improvement over prior techniques has been to save the local error function values and use them to compute and optimize the global error function needed for optimization. This improvement also avoids having to evaluate the entire global error function (global objective function) from scratch. The pairwise objective functions (local error functions) are approximated by a quadratic Taylor series, and, together with the chain rule, the global objective function (global error function) is minimized. Calculation of the global error function is greatly speeded up by this procedure.

Further regarding rectilinear images taken in a non-arbitrary manner (such as from a tripod that is rotated, or a photographer who manually “pans” a field of view), the number of pyramid levels and optimal direction for the blending of images overlapping in a region can be computed by the present invention by computing the minimum eigenvalue of the 2×2 inertial tensor of the overlapping region between two images. It has been found in practice that for an arbitrary polygon representing an overlapping region, the optimal direction for blending, as well as the width of the blending region (which determines the level in the pyramid at which to start the method of registration and optimization) is found along the minor axis of the inertial ellipse found from solving for the inertial tensor of the overlapping images. A similar method of finding the proper pyramid level is by solving for the smallest eigenvalue of an inertial tensor of the overlap region between images. Conceptually, such an ellipse is shown in FIG. 7. The blending region in an arbitrarily shaped polygon region 710, which represents the area of overlap between overlapping images, lies along the width and direction of the minor axis 712 of the ellipse 714, which is calculated from the inertial tensor of the overlapping images forming the polygon.

Thus, the results from computing the inertial tensor are used to determine the pyramid level, blending width, and blending direction. The smallest inertial eigenvalue is used to determine the number of pyramid levels. One could also use the eigenvalue vector (eigenvector) to determine the direction, or, preferably, use a blending mask, as explained herein, that yields a grayscale ramp, which defines direction in a direction field from taking the grayscale ramp gradient.

Next, after pairwise local registration, global optimization is used to remove any inconsistencies. The parameters found at the local registration level, generally from six to ten parameters per overlapping image pair, are optimized globally. Various constraints ensure optimization whenever there are suitable overlapping image pairs, as the number of independent parameters is usually less than the constraints. Regarding optimization in general, to ensure the best chance for convergence of a solution a combination of simulated annealing and progressive damping is used, as described herein.

Global optimization is necessary because noise in the images will yield inconsistencies in cyclically overlapping sets of images (e.g., that A is pairwise registered with B, B with C, and C with A, does not necessarily mean A and C are properly globally registered with C and B). During the global optimization phase, the discrepancies are distributed among all image pairs in such a way as to minimize the increase in total error. The Hessian matrix, computed in the local registration phase, as described further herein, provides a description of the shape of the error function landscape in the neighborhood of each pairwise optimum. Parametric perturbations occur along the valleys of this landscape (as indicated by the Hessian), where the increase in error is minimal. One way of looking at this solution is to say that knowledge gathered from the pairwise registration optimization is saved and used for global optimization, avoiding additional computation.

Turning attention to FIG. 4, there is shown a generalized flowchart for the calibration and global optimization module of the present invention. Data from the local pairwise registration module 222 is provided to the calibration and global optimization module 224, as indicated by box step 402. Such data can include the pairwise objective functions (local error function values) for each pairwise registration found previously. The global objective function is calculated from such data, as indicated by boxes 404, 406, and as described more fully below. The alignment of images globally is checked to ensure global registration, as in decision boxes 410 and 412, which may accept manual input from a user, via a user interface module. If there is alignment, the system proceeds from the calibration and global optimization function module to the blending of images. Otherwise, as illustrated by boxes 418 and 420, the pairwise registration module parameters (such as shown by box 314 in FIG. 3) may be re-initialized and the pairwise registration module reexecuted to recompute the pairwise registration of images, using better, updated camera parameters as determined from the global registration procedure as shown in FIG. 4.

During the blending step of the procedure utilized by the system of the present invention, the image overlap regions are “blended” or the images are “stitched” together, so that the high frequencies (e.g., sharp lines of contrast, such as edge boundaries, analogous to the high frequency signals associated with a square wave) are blended over a narrow blend region range, and the low frequencies (e.g., illumination variations, analogous to DC baseband signals) are blended over a wide range. In this way the images are seamlessly integrated to form a panorama in an aesthetic manner.

In one preferred embodiment of the invention, as illustrated by the steps in FIG. 5, blending is performed by determining the coarsest level in a Laplacian pyramid for which to begin blending of images I, J (box 504), and constructing a Laplacian pyramid at this level (box 506). One of the two images may be comprised of previously blended images. A blend mask boundary is generated (box 508), defining the boundary over which blending is to occur, preferably using the “grassfire” transform method. Next, a blend mask is generated by a Gaussian pyramid method (box 508). In one preferred embodiment, the overlapping images I and J that are to be blended are put into a Laplacian pyramid and multiplied by the blending mask, or its compliment, respectively (box 510). The resulting product is repeatedly added together to each level of the Laplacian pyramid (box 512), moving up to the finest level resolution of the pyramid in a sequential fashion (decision box 514), until a blended image is achieved for the two images. A similar procedure is performed for all other images that overlap, as indicated by decision box 516. This preferred technique has the advantage over prior techniques in that low frequency component images are blended over a wider area region, giving a smoothing effect, as desired for low frequency components, while high frequency components (such as sharp edges) are blended over a smaller blend region, giving a “sharpening” effect for these high frequency components, exactly as desired. This is illustrated conceptually by FIG. 8.

Authoring a panorama from 2D images can be thought of as divided into two different phases: (1) orientation of originally 2D images into 3D space, and (2) the projection of a panorama onto a particular 3D geometry, that can later be used to project views of the panorama onto a 2D viewing plane. A series of preferably overlapping photographs are analyzed to determine what orientation the photographs were taken in order to establish a common ground for subsequent operations, including the construction of a panorama. The panorama is not ordinarily meant to be viewed by a user, only the subsequent projection of the panorama onto a viewing plane is viewed by the user. The panorama is constructed on a particular geometry that will best facilitate the subsequent step (sometimes termed rendering) of the projection of the panorama from the particular geometry onto a chosen viewing plane for viewing by a user. Typical geometries in the system of the present invention on which panoramas are formed include: cubic, polyhedral, cylindrical and spherical geometries. However, any type of geometry may be used, such as two frusto-conical cones joined at their base with the apexes pointing away from one another; any quadric surface, and any and all of the geometries that employ the following projections: equidistant, equiangular, ellipsoid, Mercator (and all derivatives thereof, e.g., transverse Mercator, Oblique Mercator, and the like), cylindrical equal-area, Miller cylindrical, equidistant cylindrical, Cassini (e.g., both for spherical and ellipsoid projections, and the like), all conic map projections, e.g., Albers equal-area, Lambert conformal conic, equidistant conic, bipolar oblique conic conformal, polyconic, Bonne, all azimuthal and related projections, e.g., orthographic, sterographic, gnomonic, general perspective, Lambert azimuthal equal-area, azimuthal equidistant, modified-stereographic conformal, all space map projections, including space oblique Mercator and satellite-tracking projections, all pseudocylindrical and other miscellaneous projections, including Van der Grinten, sinusoidal, Mollweide and Eckert IV and VI projections. The foregoing list is meant to be illustrative and not exhaustive of the geometries and projections possible during the construction and employment of panoramas using the system of the present invention.

Further, the present invention can be employed in future systems that are fast enough to eliminate the need for a projection function module 228, and proceed directly from pairwise registration, calibration and global optimization to the viewing and blending of the panorama on a chosen viewing plane, without loss of generality. Presently, however, there is not sufficient computing power in most desktop computers for this to be feasible for real time applications.

Furthermore, the system of the present invention has means for a user interface for all phases of the invention. A user may select, among other things, which images are to be registered, and at what arbitrary image plane. The user interface, suitable for display on a computer monitor and with input from a keyboard, mouse pointer, or other I/O device, has fields for any and all internal and external parameters of the projection matrix of the images, including aspect ratio, number of rows of images, the tilt between rows, the angle between photos within a row, the roll of each image taken (e.g., landscape mode), as well as fields for how many horizontal rows of images are to be registered (typically two or more), image center position, focal length of camera, camera orientation with respect to a common reference frame, such as camera pan, tilt, roll and skew, and the brightness and contrast of images. The user interface may have the ability to adjust the aforementioned parameters for each image individually, or may have the ability to adjust parameters for images captured with a particular methodology, such as equal angular increments in latitude and longitude.

Thus, turning attention now to FIG. 6, there is shown a screen shot of a user interface for the present system, suitable for initialization parameters for an ensemble of images, captured with an equal angular increment methodology that can be facilitated by use of a tripod. The user interface is particularly useful for authoring panoramas when a user wishes to adjust the automatic default orientation generated by the computer for the present invention. A more complex user interface may be provided to accommodate the initial orientation and placement of a free-form set of images, i.e. a set of images captured without any particular methodology, such as that captured using a hand-held camera. A plurality of parameters of the kind described herein may be manually entered into the dialog box fields by the user (if known) to aid in the pairwise registration, calibration and global optimization and blending of images. Further, the particular images selected for pairwise registration and calibration and global optimization may be aborted during non-convergence run-away conditions. Some of the parameters that may be explicitly specified by a user include (referring to FIG. 6) the number of rows 602 (assuming a panning of photos are taken, with a number of overlapping rows of photos taken about a 360 degree arc), initial pan 604, initial tilt 606, pan increment 608 and initial roll 610 for the first row of photos (rows are preferably used, but vertical columns of photos are also contemplated); and, for inter-row parameters, the pan increment 612, roll increment 614 and tilt increment 616. Zoom lens distortion factors and other miscellaneous factors may be entered in dialog fields such as field 620. Other parameters may be specified for overriding the computer defaults and for better guaranteeing convergence, such as camera focal length or f-stop, pixel aspect ratio, and the like. In addition, the user interface may allow for the selection, arrangement and relative positioning of photos to be composed into a panorama, preferably in a row by row layout, with preferably at least one or more rows of photos to be made into the panorama.

Further, while one preferred embodiment of the present system is designed for overlapping image pairs to share a common nodal position, in general the system is forgiving of nodal point changes, provided the changes are not excessive, e.g., a 1% shift in nodal point should still allow satisfactory panoramas to be formed. The one-percent shift is not overly cumbersome when taking long range photos, e.g., from the height of the 300 m Eiffel Tower a 1% shift will allow up to 3 meters (nearly 10 ft) of shifting of camera nodal position when taking photos at the base, which can accommodate an amateur photographer taking pictures without a tripod.

Turning attention again to the three modules labeled Pairwise Registration, Calibration and Global Optimization and Blending, as illustrated in FIG. 2, the authoring aspect of the invention will be further described.

I. Pairwise Registration

To find a solution to the first sub-problem posed in constructing a panorama from rectilinear images, finding the projective registrations of overlapping images, one must pairwise register the two images. Pairwise registration can be thought of as synonymous to finding an estimate of the projective transformation relating two given overlapping rectilinear images. The projective transformation may be represented by a particular parametrized projective matrix, that is parametrized by a typical canonical number (usually 8 or 9) projective parameters, e.g., 3D rotation parameters (pan, tilt roll), center of projection of images, ratio of focal lengths, and the like. The projective matrix can be defined as a particular case of a three-dimensional affine transformation, a transformation that effects rotation, scaling, shear and translation, with the restriction that camera motions are rotational. As is known per se, transformations are important tools in generating three-dimensional scenes, in moving objects around in an environment, and in constructing a two-dimensional view of the environment.

The mathematics described herein are but one representation for the method carried out by the apparatus of the present system for one or more preferred embodiments of the invention. In mathematics the same phenomena can be represented in different symbolic notation—which often appear to the untrained eye as being radically different from one another—without changing the nature of the phenomena described. For example, as explained above and represented further below, the projective transformation of a pair of images can be more particularly characterized as a projective transformation that is particularized as a projective matrix parametrized by a certain projective matrix parameters (typically having 8 or 9 projective parameters, as explained herein, such as pan, tilt, roll, center of projection of the images, ratio of focal lengths, and the like). However, this particular representation does not preclude the projective transformation from being reduced to practice using the teachings of the present invention by alternate equivalent methods or other representations, other than as represented by a particular parametric matrix representation, without loss of generality from the way the invention is described herein. Further, and concomitantly, the transformations involved with the present invention may be described in alternate notation, using for example Euler angles or quaternions, without detracting from the spirit and scope of the invention. It is to be understood from the teachings of the present disclosure that the description of a projective matrix also includes these other representations. By the same token, programming constructs such as data structures and classes are typically realized in binary code, rather than abstract mathematical notations, and, as such, constitute the machine readable representations of the constructs. The representation of such constructs in this form do not result in any loss of generality of the representation of the underlying invention as described herein.

Regarding local pairwise registration in general, if one restricts camera motions to be rotational only, the 2D warping between images i, j, is strictly projective in absence of lens distortions, and given by, [Eq. (1)] $\begin{matrix} {\begin{bmatrix} \begin{matrix} x_{i} \\ y_{i} \end{matrix} \\ z_{i} \end{bmatrix} = {\begin{bmatrix} m_{0} & m_{1} & m_{2} \\ m_{3} & m_{4} & m_{5} \\ m_{6} & m_{7} & m_{8} \end{bmatrix}\begin{bmatrix} \begin{matrix} x_{j} \\ y_{j} \end{matrix} \\ z_{j} \end{bmatrix}}} & (1) \end{matrix}$

where $\begin{bmatrix} x_{i} & y_{i} & z_{i} \end{bmatrix}^{T}$

are the homogeneous coordinates of pixel locations (with the convention that column vectors represent three-dimensional points). In the following description, the vector X_(i) represents the homogeneous coordinates, and the matrix M_(ij) represents the matrix that transforms coordinates from image j to image i. Due to the scale ambiguity in the projective matrix, the last parameter m₈ in the projective matrices is set to equal 1.

The objective of local pairwise registration is to estimate the projective matrix given two overlapping images. The projective matrix is initialized by the camera internal and external parameters, e.g., [Eq.(2)]

M _(ij) =T ⁻¹(p _(i) ,q _(i))T(p _(j) ,q _(j))  (2)

[Eq. (3)]

where $\begin{matrix} {{T\left( {p_{i},q_{i}} \right)} = {{R\left( q_{i} \right)}\begin{bmatrix} 1 & 0 & {- C_{x}^{i}} \\ 0 & a_{i} & {- C_{y}^{i}} \\ 0 & 0 & f_{i} \end{bmatrix}}} & (3) \end{matrix}$

where [C_(x) ^(i), C_(y) ^(i)], a_(i), F_(i) are the image center position, the aspect ratio and the focal length, respectively; $p_{i} = \begin{bmatrix} {a_{i},} & {f_{i},} & {C_{x}^{i},} & C_{y}^{i} \end{bmatrix}^{T}$

is the internal parameters vector;

q_(i)=represents the camera orientation with respect to a common reference frame; and

R( )=represents the 3×3 rotation matrix computed from the orientation parameters q_(i).

Camera internal and external parameters are initialized either automatically by the computer assuming default values, or manually with user input.

There are ten parameters in the projective registration: eight independent parameters in the projective matrix and two parameters to compensate for brightness and contrast difference between the two images. The gradient-based optimization minimizes the following objective, as suggested in box 320 in FIG. 3, by instructing the processor 212 to perturb the overlapping images stored in memory with various combinations of overlapping pixels until the below local registration error function has the smallest value [Eq. 4]: $\begin{matrix} {e_{ij} = {\frac{1}{A_{ij}}{\sum\limits_{overlap}\left( {{s_{ij}{I_{j}\left( X_{j} \right)}} + b_{ij} - {I_{i}\left( {M_{ij}X_{j}} \right)}} \right)^{2}}}} & (4) \end{matrix}$

where s_(ij) and b_(ij), the exposure parameters, represent the exposure difference, I_(i)( ) and I_(j)( ) are pixel intensity values from the two images, and A_(ij) is the overlap area (which helps normalize the error function e_(ij)). The optimizations are performed on progressively finer levels of Gaussian pyramids. In practice, however, it has been found that the direct application of gradient-based optimization frequently failed due to exposure differences, large translations, or both. Therefore, preferably a combination of correlation-based linear search and a progressive damping (e.g., simulated annealing) of exposure parameters is used to alleviate the problem, as suggested by box 318 of FIG. 3. On the coarsest pyramid level (e.g., ‘lowest’ resolution level of the image, the method of the invention first performs a linear search over the transitional parameters using normalized correlations, an idea similar to a progressive complexity search known per se in the art, e.g., see H. Sawhney and R. Kumar, “True multi-image alignment and its application to mosaicing and lens distortion correction”, Proc. of CVPR, pp. 450-56 (1997). Since the image size on the coarsest pyramid level is small, the correlations are done efficiently. Once the maximal correlations are found, the exposure parameters s_(ij) and b_(ij) are estimated through a linear regression. When the gradient-based optimization is performed on subsequent finer pyramid levels, the damping coefficients on exposure parameters are reduced exponentially, and finally set to zero at the finest pyramid level.

To determine the number of pyramid levels given an arbitrary overlap of two images, one can compute the eigenvalues of the 2×2 inertial tensor of the overlap polygon region. Determining eigenvalues and inertial tensors are known in the art per se. The square root “I” of the smaller eigenvalue is used to estimate the number of pyramid levels according to the formula: $\begin{matrix} {\log_{2}\left( \frac{l}{l_{\min}} \right)} & (5) \end{matrix}$

where I_(min) is the minimal size of the finest level resolution pyramid level. In a preferred embodiment, I_(min) is set to 10 pixels.

II. Calibration and Global Optimization

The second major step in authoring panoramas is to extract camera internal and external parameters from those projective matrices estimated in step I above. In general, it is impossible to achieve a direct solution by inverting Eq. (2) above directly to obtain the camera parameters, since there are eleven camera parameters while a projective matrix provides only eight constraints. However, because one image usually overlaps with multiple images, one can take advantage of redundancy in the system to obtain a consistent set of camera parameters that approximates all projective matrices in the same time. A global optimization routine module is used to achieve this goal.

Since the projective matrix is a function of camera parameters as in Eq. (2), to extract all camera internal and external parameters the following objective functions are minimized by having the calibration and global optimization module 224 of FIG. 2 instruct the processor to perturb different combinations of images stored in memory to minimize the following global error function: [Eq. (6)]

E=Σ _(ij) A _(ij) e _(ij)(M _(ij)(p _(i) ,q _(i) ,p _(j) ,q _(j)))  (6)

where e_(ij) is the pairwise objective function in Eq. (4).

However, it has been found that it is computationally prohibitively expensive to evaluate the objective functions according to Eq. (6). By noting that the pairwise objective function e_(ij) has already been optimized individually, we can approximate it by a quadratic surface, which can be viewed as terms from a matrix Taylor Series expansion. Thus, in a preferred embodiment, the following approximation is used in the calibration and global optimization routine module: [Eq. (7)]

e _(ij)(M _(ij))≈e _(ij) ⁰+(M _(ij) −M _(ij) ⁰)^(T) C _(ij)(M _(ij) −M _(ij) ⁰)  (7)

where e_(ij) ⁰ is a constant representing the minimal value achieved in the pairwise registration; M_(ij) ⁰ is the 8×1 vector representing the optimal projective matrix, and

C_(ij) is the 8×8 Hessian matrix obtained when optimizing objective function e_(ij), as in the methods of Levenberg-Marquardt or Broyden-Fletcher-Goldfarb-Shanno, known in the art per se. Thus the projective matrix can be treated as an 8×1 vector instead of a 3×3 matrix. This step is represented in FIG. 4 as box 404 Other methods may be employed in the present invention using the teachings herein without departing from the scope of the invention.

Next, once the pairwise objective functions are approximated by quadratic surfaces with Eq. (7), the global objective function in Eq. (6) is used as a weighted sum of all those quadratic surfaces thus computed in the global optimization routine module. The global objective function has a gradient with respect to the camera internal and external parameters that can be easily established thorough the chain rule: [Eq. (8)] $\begin{matrix} {\frac{\partial E}{\partial\left( {p_{i},q_{i}} \right)} = {\sum\limits_{j}{\frac{\partial e_{ij}}{\partial M_{ij}}\frac{\partial M_{ij}}{\partial\left( {p_{i},q_{i}} \right)}}}} & (8) \end{matrix}$

from using Eq. (2) and Eq. (7) above, as shown in FIG. 4 as box 406. It has been found that since no direct evaluation on images is involved, the computation required using Eq. (7)-(8) as described above in minimizing the global objective function for all the overlapping images is nearly trivial. The computational savings using the techniques described herein result in several orders of magnitude in savings of time and speed over prior techniques of optimization.

In the most general case, the camera parameters for each image are four internal parameters, p_(i), and three orientation parameters qi. Every pairwise registration provides eight constraints on those camera parameters. When there are plenty of overlapping images pairs, the optimization is overconstrained, in that the number of independent parameters is generally less than that of the number of constraints. However, in practice, even when the optimization appears to be overconstrained, oftentimes camera parameters are so weakly constrained that they can easily diverge the whole optimization.

In order to solve the aforementioned problem, so that the optimization described herein behaves well in underconstrained or weakly constrained situations, it is preferred that simulated annealing be used to dampen the camera internal parameters. Conceptually this step is shown in the generalized flowchart of FIG. 4 as box 408. As the optimization progresses, the damping parameters are gradually reduced. The exposure parameters s_(ij) and b_(ij) are estimated through a linear regression. The proposed solution has been found to work remarkably well in practice, and is a significant improvement over prior techniques.

The pairwise registration and global optimization described above can be iterated if the alignments are still not satisfactory, by either by a user acting through the user interface, or by automated means, as indicated by arrows 233 in FIG. 2 and boxes 418 and 420 in FIG. 4. Thus, in the iteration, the pairwise registration module 222 will use the improved camera parameters generated by the calibration and global optimization module 224 to re-initialize the projective registrations, and re-compute the optimal projective matrices and their Hessians. Then the improved projective matrix parameters will, in turn, be used to generate improved estimations of camera parameters in the global optimization module 224. Likewise, blending may be further iterated after registering, calibrating and optimizing the images after an initial blending.

III. Blending

Notwithstanding the improved method and system of pairwise registration, camera calibration and global optimization of images described above, it has been found that for high quality panoramas blending of overlapping image boundaries is often required prior to viewing the panorama. Such blending is required when the pairwise registration and global optimization by the system generates panoramas having imperfectly aligned images that give “shadow” or “ghosting” effects, if the images are averaged in overlap regions. As human eyes are very sensitive to such imperfections, in one preferred embodiment human input may be used to facilitate proper blending during the authoring of a panorama, using the system and method disclosed herein. Other methods for blending may also be employed in the present invention, such as the multi-resolution weighted average method, and the weighted average method. In the weighted average method, as illustrated in FIG. 9, there is a transition region 902 between images to be blended, Image 1 and Image 2. The weights of image 1 for intensity or other parameter is linearly decreased from a value of 1.0 to 0.0 in the transition region, while the weights of Image 2 is increased from 0.0 to 1.0. A pixel in the transition area is a weighted sum of two pixels from two images.

By contrast, the multi-resolution weighted average method first decomposes two images into different frequency bands by building Laplacian pyramids, and performs separate weighted averages on each pyramid level with different transition lengths for each frequency. Transition lengths are defined by the region it takes for a parameter to go from value 1 to 0 or 0 to 1. FIG. 8 shows the transition lengths for different frequency bands (low, middle and high) of images, with high frequency image components having a shorter transition length region than low frequency image components. The result of this multi-resolution blending method is seamless and absent of shadow effects. Multi-resolution weighted average blending, known per se in the art, is further described in P. Burt and E. Adelson, “A multiresolution spline with application to image mosaics”, ACM Transactions on Graphics, 2(4):217-236 (1983). While multi-resolution blending described herein is the preferred blending technique in a preferred embodiment of the invention, other types of blending, including simple weighted average blending, is within the scope of the invention.

To determine the boundary of overlap regions to perform multi-resolution blending, preferably a blend mask is needed for an arbitrarily shaped transition region. The Gaussian pyramid of the mask image supplies the weights for every pixel at every pyramid level. FIGS. 10(a) and (b) illustrate the blend mask 1000 used for the panoramic canvas having two overlapping images, Image 1002 (Image 1) and 1004 (Image 2). In order to maximize the size of the transition region for blending, the boundary curve of the mask inside the overlap regions, boundary 1001, needs to be as far way as possible from the original image boundaries. To locate the mask boundary a grassfire transform is preferably used on two images individually. The resulting distance maps represent how far away each pixel is from its nearest boundary. The pixel values of the blend mask is then set to either 0 or 1 by comparing the distance values at each pixel in the two distance maps.

Generally, the grassfire transform measures distance by noting the time it takes for a constant velocity wave front to reach a certain point, knowing that distance equals velocity multiplied by time. Conceptually, the distance is measured as if distance were measured by noting the time elapsed that a grass fire, having constant velocity and lit on the edges of a grass field, progresses to the center of the field. In this way the exact boundaries of the field do not have to be surveyed by more precise techniques of geometry. Further details regarding the grassfire transform, known per se in the art, can be found in the literature, e.g., C. Arcelli, L. P. Cordella, and S. Levialdi, “A grassfire transformation for binary digital pictures.”, ICPR74, pp. 152-54 (1974). However, though the grassfire transform is preferred in one embodiment of the present invention, other techniques may be used to generate a blend mask, such as solving directly a Laplacian differential equation with predetermined boundary conditions to directly generate a mask with the addition of a gray scale.

Regarding the blending procedure, the blending is achieved by the following method. An empty panoramic canvas, which can simply be a buffer of memory in a computer system, such as memory 220 in FIG. 2, is copied with the first image, Image 1. Second, new images are blended onto the panoramic canvas one by one. For each of those new images, the blend mask from the panoramic canvas and the new image is generated. Next, there are computed Laplacian pyramids of the images and Gaussian pyramids of the masks in the bounded rectangular areas of the overlap regions. Multi-resolution blending is used to blend the Laplacian and Gaussian pyramids. Finally, the blended images is copied onto the panoramic canvas, which may hold other images.

The flowchart for this procedure, generally speaking, is along the lines as shown conceptually in FIG. 5, and as can be modified from the teachings of the present invention.

(1) determine the coarsest level resolution level of a Laplacian pyramid at which two images I_(i), I_(j) (or I, J) are to be blended (step 504). The bottom-most level is computed from computing the inertial tensor of the images I, J, which gives an inertial ellipse having a minor axis that is used to find the number of pyramid levels in the Laplacian pyramid.

(2) From the overlapping images I, J construct a Laplacian pyramid (step 506), as is known per se in the art, starting at the finest level of resolution and working through the pyramid to more coarser levels of resolution.

(3) Generate a blend mask (step 508), preferably using the grassfire transform described herein, and construct a Gaussian pyramid from the blend mask. The Gaussian pyramid may be constructed by applying a low-pass filter to the blend mask, which dilutes the sharp edges, from linear interpolation between the black and white regions of the blend mask, or from other techniques.

(4) At each level in the Laplacian pyramid of images I, J that are to be blended, blend the overlap regions, preferably by the method of multiplying the Laplacian values of images I, J times the weighted values supplied by the Gaussian pyramid based blend mask, according to the value for I times the mask value (MV), or the value for J times the compliment of the mask value (1−MV), (step 510).

(5) Add the results at each level of the Laplacian pyramid (step 512), until the finest level resolution of the Laplacian pyramid is reached (or upon user interruption, as always) (steps 512 and 514).

(6) Perform steps (1)-(5) for all images to be blended in the blend region (step 516). Previously blended images may be blended with new images, and blending may be iterated, with human input or automatically.

The net result of these steps is that the lowest frequency component images are blended over the entire transition region, giving a desired smoother effect, while high frequency components (such as sharp edges) are blended over a smaller region, typically 3-5 pixels wide, which “sharpens” these high frequency components, as desired. Conceptually this is shown in FIG. 8, with the blending regions 802, 804, 806 for the low, middle and high frequencies being shorter, respectively, according to the functioning of the blending module as described.

The net visual effect of the blending described herein, besides producing a pleasing smoothing of images that helps eliminate ghosting, is an “auto-iris” effect, in that luminosity appears to be automatically adjusted when moving from a high intensity image to a low intensity image, similar to the adjustments made by a human eye.

In practice, it has been found that on occasion, where there are overlaps of more than two images, a particular problem is encountered in the blending of images, as illustrated graphically in FIG. 11(a). When a first (N−1) images are sequentially blended onto the panorama canvas, and there is an attempt to blend Image N, most of the area covered by Image N is already blended by an “unintended” overlap between Image 1 and Image N−1, with the blend mask 1110 indicated generally as the gray area inside the dotted lines. As a result, Image N has little effect on the panorama even though it provides much large transition areas between Image 1 and Image N−1, and therefore has the potential to improve the quality of the panorama. In the most general case, because of the nature of panoramas, the problem illustrated by FIG. 11(a) has the potential to occur on occasion.

One method to solve the problem illustrated by FIG. 11(a) during authoring of the panorama is to allow manual input to override the computer default ordering for the blending of images. Images with larger overlaps (e.g., a very dark, low frequency image that may be a background color to a series of high frequency lighter foreground images) should be blended onto the panoramic canvas first manually, and can be selected for blending by a user of the present apparatus, through a suitable user interface that lists the images to be blended first in a priority list.

Another more automated method to solve the problem illustrated by FIG. 11(a) is illustrated conceptually in FIG. 11(b). The automated solution uses a labeling scheme. For every pixel on the panoramic canvas, which may be a blended pixel, the computer labels it with a number indicating which source image contributes the most to this pixel. In FIG. 11(b), the dashed line 1120 represents the blend mask boundary when Image 1 and Image N−1 are blended. The pixels on the left of the dashed line 1120 have label 1, as Image 1 contributes the most to the pixel values in that area of the panoramic canvas, while the pixels on the right side of the dashed line 1120 have label N−1, as image N−1, which may be a previously blended image, contributes the most to the pixel values in that area. When another image, Image N, needs to be blended onto the panoramic canvas, first a grassfire transform on the panoramic canvas is performed. In addition to the actual image boundaries, the dashed line 1120, representing the blend mask boundary between images Image I and Image N−1, is regarded as a virtual boundary, or “firewall”, that the grassfire cannot penetrate. The virtual boundaries are computed easily using the pixel labels and the list of all intended overlaps. The resulting blend mask is illustrated as the gray area 1130 in FIG. 11(b), which is much larger than the blend mask area of FIG. 11(a). Using this “firewall” technique, the blending takes advantage of both large overlaps between Image I and Image N, and Image N and Image N−1, which alleviates the aforementioned problem associated with FIG. 11(a).

IV. Human Interface

Human interaction is an integral part of the method and apparatus of the present invention. The system of the present invention is trying to solve a complicated nonlinear optimization problem. No automated procedure can guarantee its convergence to a global minimum; in this sense the system is heuristic. On occasion, human interaction through a user interface can steer the system to produce a more satisfactory panorama. Some areas of possible human interaction with the system include manual projective registration, initial calibration, and feedback generally.

In manual projective registration, human interaction is sometimes beneficial in cases where the projective registration of images breaks down due to factors such as excessive exposure difference, motion in the scene, bad initial estimates, and the like. When automatic registration fails, human interaction through a user interface, such as through user interface function module 230 of FIG. 2, allows for manual registration, through a windows-based interface, such as of the type discussed in connection with FIG. 6. In this instance a human would manually initially align images more precisely (relying on eyesight and a mouse pointer, or, by manually entering via a keyboard the coordinates for positioning an image) for either pairwise local registration or global registration, in order to then allow the computer to automatically optimize the images as discussed herein. The user would not supersede the system of the present invention, but assist the system to allow for the automatic convergence to a solution.

Similarly, in initial calibration, e.g., step 314 in the embodiment of FIG. 3, the number of camera internal and external parameters is large in the general case. The global optimization function module needs initial conditions in order to converge to the right answer. A user interface, such as of the kind discussed in FIG. 6, provides an interactive tool to initialize those parameters. Thus, in the event the user has more accurate information about initial parameters than is supplied by the computer default parameters, the user can input those parameters.

Human interaction is present throughout to provide feedback to the computer system of the present invention. The system must have the ability to provide feedback in all the nonlinear optimizations to let users monitor the progress of the system, and allow them to intervene when necessary. In a preferred embodiment, the user interface for human interaction may be a real-time texture map engine which simulates a virtual camera looking out from the common nodal point of the rectilinear images. All images are seen floating in 3D space. The user can select any image and change its internal and external parameters interactively in real time. In one preferred embodiment, the images may be seen as if the user was situated inside of a sphere, termed a spherical coffee-table, illustrated conceptually as virtual reality space in FIG. 12, with the images 1210 presented tangent to the outside of the viewing sphere 1220. The arrangement of the images outside the sphere may be arranged by a virtual reality type authoring user interface, with the user free to arrange which images will be blended, and where, by placing the images at selected tangents on the viewing sphere 1220. Details of this interface can be implemented by one of ordinary skill in the art using the teachings of the present invention. The images, once selected by a user, are pairwise registered, calibrated, globally optimized and blended, as taught herein, to construct a panorama that may then be projected onto a sphere, producing a 3D panorama viewing space.

Although the present invention has been described in terms of the preferred embodiments above, numerous modifications and/or additions to the above-described preferred embodiments would be readily apparent to one skilled in the art. It is intended that the scope of the present invention extends to all such modifications and/or additions and that the scope of the present invention is limited solely by the claims set forth below. 

We claim:
 1. A computer system for authoring panoramas, comprising: memory storing data representations of a plurality of images; I/O for inputting and outputting data; function modules in said memory; a processor cooperating with said memory and I/O for processing instructions and data from said memory, said I/O and said function modules; a pairwise registration function module in said memory and operating said processor for pairwise registration of said images, said pairwise registration function module generating output data related to said pairwise registration of said images, the pairwise registration function module including a projective matrix, wherein the projective matrix is a function of image center position, said output data including a Hessian matrix; a calibration and global optimization function module in said memory and operating said processor for calibration and global optimization of said output data of said pairwise registration module, said calibration and global optimization module generating output data related to said calibration and global optimization of said images; a blending function module in said memory and operating said processor for generating at least one panorama from said output data from said pairwise registration module and said calibration and global optimization module; and a projection function module in said memory and operating said processor for forming a panorama from said images.
 2. The invention according to claim 1, wherein: said pairwise registration function module operates said processor to register a plurality of each of said images that overlap with one another, by perturbing said images.
 3. The invention according to claim 2, wherein: said pairwise registration function module performs a projective transformation between a pair of said images, said projective transformation is estimated by said pairwise registration function module by performing a gradient-based optimization that minimizes a local error function.
 4. The invention according to claim 3, further comprising: a user interface module in said memory, and cooperating with said I/O, operating said processor for initializing said projective matrix of said pairwise registration function module, said user interface module operating to process input from a user of the computer system, wherein said projective matrix is initialized with said camera internal and external parameters from manual input by a user; and, said pairwise registration function projective transformation error function is comprised of the differences in exposures between pixels comprising the pairs of images, and contains a projective matrix initialized by camera internal and external parameters relating to said plurality of images.
 5. The invention according to claim 4, wherein: said internal and external parameters are selected from the group comprising: image center position of each of said pairs of images, aspect ratio of said pixels comprising said images, the focal length of the camera which took said images; the camera orientation with respect to a common reference frame, camera pan, tilt, roll and skew and brightness and contrast of said pairs of images.
 6. The invention in accordance with claim 4, wherein said user interface module comprises a virtual reality environment comprising a spherical coffee table.
 7. The invention according to claim 6, wherein: said user interface module allows the user to select the arrangement of said images from a plurality of rows or columns of photos.
 8. The invention according to claim 3, wherein: said local error function, eij, is given by the equation $e_{ij} = {\frac{1}{A_{ij}}{\sum\limits_{overlap}\left( {{s_{ij}{I_{j}\left( X_{j} \right)}} + b_{ij} - {I_{i}\left( {M_{ij}X_{j}} \right)}} \right)^{2}}}$

where s_(ij) and b_(ij), the exposure parameters, represent the exposure difference, I_(i)( ) and I_(j)( ) are pixel intensity values from two images, and A_(ij) is the overlap area of said images, the vector X_(i) represents the homogeneous coordinates of the pixel locations making up said images, and the matrix M_(ij) represents the matrix that transforms coordinates from image j to image i.
 9. The invention according to claim 8, wherein: said pairwise registration function module operates said processor to form a Gaussian pyramid in said memory from said plurality of overlapping images, said Gaussian pyramid having a plurality of levels, each subsequent level being finer than each preceding level, said optimization of said local error function is performed on progressively finer levels of said Gaussian pyramid; said pairwise registration function module operates said processor to estimate said exposure parameters, s_(ij) and b_(ij), of said local error function by a correlation-based linear search, and attenuates said exposure parameters with progressive damping, said progressive damping set to maximum at the coarsest level of said pyramid and decreasing to zero at the finest level.
 10. The invention according to claim 2, wherein: said pairwise registration function module operates said processor to form a Gaussian pyramid in said memory from said plurality of overlapping images, said Gaussian pyramid having a plurality of levels, each subsequent level being finer than each preceding level, said optimization of said local error function is performed on progressively finer levels of said Gaussian pyramid.
 11. The invention according to claim 10, wherein: the number of pyramid levels of said Gaussian pyramid is computed by said pairwise registration function module according to the formula: $\log_{2}\left( \frac{l}{l_{\min}} \right)$

where I is the square root of the smaller eigenvalue of the 2×2 inertial tensor of the overlap polygon region of said plurality of images, and I_(min) is the minimal size of the finest level resolution pyramid level.
 12. The invention according to claim 2, wherein: a calibration and global optimization function module in said memory and operating said processor for calibration and global optimization of said output data of said pairwise registration module, said calibration and global optimization module generating output data related to said calibration and global optimization of all of said overlapping images.
 13. The invention according to claim 12, wherein: said calibration and global optimization function module calibrates and optimizes said output data of said pairwise registration module by approximating said local error function.
 14. The invention according to claim 13, wherein said approximation of said local error function, eij, is a Taylor Series expansion given by the formula: e _(ij)(M _(ij))≈e _(ij) ⁰+(M _(ij) −M _(ij) ⁰)^(T) C _(ij)(M _(ij) −M _(ij) ⁰) where e_(ij) ⁰ is a constant representing the minimal value achieved by said pairwise registration function module; M_(ij) is the projective matrix of overlapping pairs of images, M_(ij) ⁰ is the vector representing the optimal projective matrix, and C_(ij) is the Hessian matrix obtained by the pairwise registration function module when optimizing objective function e_(ij).
 15. The invention according to claim 14, wherein said calibration and global optimization function module calculates a global error function for all overlapping images by application of the chain rule to said output data of said pairwise registration module, according to the formula: $\frac{\partial E}{\partial\left( {p_{i},q_{i}} \right)} = {\sum\limits_{j}{\frac{\partial e_{ij}}{\partial M_{ij}}\frac{\partial M_{ij}}{\partial\left( {p_{i},q_{i}} \right)}}}$

and minimizes said global error function, where p_(j)=the vector for camera internal parameters for each image j, and q_(j)=the camera orientation with respect to a common reference frame for each image j.
 16. The invention according to claim 12, further comprising: said pairwise registration function module operates said processor to estimate a projective transformation for pairwise registration of images.
 17. The invention according to claim 16, wherein: said projective transformation is initialized by camera internal and external parameters relating to said plurality of images in said pairwise registration function, and said projective transformation is initialized by said output data generated by said calibration and global optimization module generating output data, in an iterative manner, and, said calibration and global optimization function module attenuates camera internal parameters during said calibration and global optimization.
 18. The invention according to claim 1, wherein: said blending function module generating at least one panorama by employing in the image overlap areas of said output data a multi-resolution weighted average blending.
 19. The invention according to claim 1, further comprising: a user interface function module in said memory and operating said processor for accepting input from a human user, and for adjusting the areas said images overlap; said blending function module generating at least one panorama by blending said images where the images overlap, in response to said user interface module.
 20. The invention according to claim 1: said blending function module generates said panorama from said output data comprising images having image overlap regions, said blending function module blending by instructing said processor to construct Laplacian pyramids stored in said memory for each plurality of images that overlap in said image overlap regions, said Laplacian pyramids having a plurality of levels, said blending function module determining the coarsest level resolution level of the Laplacian pyramids for each of said images, said blending function module generating a blend mask from the image overlap region of said plurality of images, said blending function module constructing a Gaussian pyramid from said blend mask for each said plurality of images, and blending said images by multiplying said Laplacian and Gaussian pyramid values for every level of said Laplacian pyramids for every said plurality of images.
 21. The invention according to claim 1, wherein said blending function module blends the high frequency components of said images that overlap over a smaller region in the area of overlap than the low frequency components of said images.
 22. The invention according to claim 21, wherein said smaller region is on the order of 3-5 pixels.
 23. The invention according to claim 1, wherein said projection function module forms said panorama on a geometry that is selected from geometries consisting of: cubic, polyhedral, cylindrical and spherical geometries, frusto-conical cones joined at their base with the apexes pointing away from one another; any quadric surface and geometries using the following projections: equidistant, equiangular, ellipsoid, Mercator, transverse Mercator, Oblique Mercator, cylindrical equal-area, Miller cylindrical, equidistant cylindrical, Cassini, Albers equal-area, Lambert conformal conic, equidistant conic, bipolar oblique conic conformal, polyconic, Bonne, azimuthal, orthographic, sterographic, gnomonic, general perspective, Lambert azimuthal equal-area, azimuthal equidistant, modified-stereographic conformal, space map projections, space oblique Mercator, satellite-tracking projections, pseudocylindrical projections, Van der Grinten, sinusoidal, Mollweide and Eckert IV and VI projections.
 24. The invention in accordance with claim 1, wherein said calibration and global optimization function module calibrates and optimizes said output data of said pairwise registration module by approximating a local error function.
 25. The invention according to claim 24, wherein said approximation of said local error function is a Taylor Series expansion given by the formula: e _(ij)(M _(ij))≈e _(ij) ⁰+(M _(ij) −M _(ij) ⁰)^(T) C _(ij)(M _(ij) −M _(ij) ⁰) where e_(ij) ⁰ is a constant representing the minimal value achieved by said pairwise registration function module; M_(ij) is the projective matrix of overlapping pairs of images, M_(ij) ⁰ is the vector representing the optimal projective matrix, and C_(ij) is the Hessian matrix obtained by the pairwise registration function module when optimizing objective function e_(ij).
 26. The invention according to claim 25, wherein said calibration and global optimization function module calculates a global error function for all overlapping images by application of the chain rule to said output data of said pairwise registration module, according to the formula: $\frac{\partial E}{\partial\left( {p_{i},q_{i}} \right)} = {\sum\limits_{j}{\frac{\partial e_{ij}}{\partial M_{ij}}\frac{\partial M_{ij}}{\partial\left( {p_{i},q_{i}} \right)}}}$

and minimizes said global error function, where p_(j)=the vector for camera internal parameters for each image j, and q_(j)=the camera orientation with respect to a common reference frame for each image j.
 27. In a computer having a processor which executes instructions stored in memory, a method for generating panoramas comprising the steps of: storing at least two rectilinear images in a computer memory; generating image output data by performing pairwise registration of said rectilinear images as an estimate to a projective transformation relating to said rectilinear images, wherein the projective transformation includes a projective matrix, the matrix being a function of image center position; generating image output data by calibration and global optimization of said rectilinear images from image output data from said pairwise registration, said image output data including a Hessian matrix; blending said rectilinear images to create a panorama from said generated image output data from said pairwise registration and said calibration and global optimization.
 28. The method according to claim 27, wherein: said step of blending said rectilinear images to create a panorama comprises the step of identifying a region of overlap between said rectilinear images from said generated data; generating a blend mask from said rectilinear images from said generated data; locating the boundary of said mask by performing a grassfire transform on said at least two rectilinear images individually.
 29. The method according to claim 27, wherein: said step of generating data by performing pairwise registration of said rectilinear images by estimating said projective transformation of said rectilinear images comprises the steps of: initializing said projective transformation with camera internal and external parameters of two rectilinear images that overlap; forming a Gaussian pyramid from said plurality of overlapping rectilinear images; perturbing said overlapping rectilinear images until a local registration error function is minimized at a first level of said Gaussian pyramid for said images.
 30. The method according to claim 29, wherein: wherein said camera internal and external parameters are selected from the group comprising the image center position of each of said pairs of images, aspect ratio of said pixels comprising said images, the focal length of the camera which took said images; the camera orientation with respect to a common reference frame, camera pan, tilt, roll and skew and brightness and contrast of said images.
 31. The method according to claim 29, wherein: said local registration error function, eij, is given by the equation: $e_{ij} = {\frac{1}{A_{ij}}{\sum\limits_{overlap}\left( {{s_{ij}{I_{j}\left( X_{j} \right)}} + b_{ij} - {I_{i}\left( {M_{ij}X_{j}} \right)}} \right)^{2}}}$

where s_(ij) and b_(ij), the exposure parameters, represent the exposure difference, I_(i)( ) and I_(j)( ) are pixel intensity values from two images, and A_(ij) is the overlap area of said images, the vector X_(i) represents the homogeneous coordinates of the pixel locations making up said images, and the matrix M_(ij) represents the matrix that transforms coordinates from image j to image i; further comprising the step of pairwise registration of said overlapping images on successive iterations of said Gaussian pyramid.
 32. The method according to claim 31, further comprising the step of: attenuating said estimated exposure parameters, sij and bij, in said equation, at each successive iteration of said Gaussian pyramid by progressive damping, said damping set to maximum at the coarsest level of said Gaussian pyramid and decreasing to zero at the finest level of said Gaussian pyramid.
 33. The method according to claim 32, further comprising the step of: estimating said exposure parameters, sij and bij, according to a correlation based linear search.
 34. The method according to claim 31, further comprising the step of: finding said first level of said Gaussian pyramid by successively moving down said Gaussian pyramid until a predetermined number of pixels from each of said images overlap.
 35. The method according to claim 34, further comprising the step of: determining the number of levels of said Gaussian pyramid of said pairwise registration of overlapping images according to the formula: $\log_{2}\left( \frac{l}{l_{\min}} \right)$

where I is the square root of the smaller eigenvalue of the 2×2 inertial tensor of the overlap polygon region of said plurality of images, and I_(min) is the minimal size of the finest level resolution pyramid level.
 36. The invention according to claim 29, wherein: wherein said calibration and global optimization function module calibrates and optimizes said output data of said pairwise registration module by approximating said local error function, eij; wherein said step of estimating said local error function is an approximation of said local error function given by the formula: e _(ij)(M _(ij))≈e _(ij) ⁰+(M _(ij) −M _(ij) ⁰)^(T) C _(ij)(M _(ij) −M _(ij) ⁰) where e_(ij) ⁰ is a constant representing the minimal value achieved by said pairwise registration function module; M_(ij) is the projective matrix of overlapping pairs of images, M_(ij) ⁰ is the vector representing the optimal projective matrix, and C_(ij) is the Hessian matrix obtained by the pairwise registration function module when optimizing objective function e_(ij).
 37. The invention according to claim 36, further comprising the steps of: saving said approximated local error function generated during pairwise registration of said images according to the steps above; computing, for each and every overlapping images, said calibration and global optimization of said images, according to the global error formula: $\frac{\partial E}{\partial\left( {p_{i},q_{i}} \right)} = {\sum\limits_{j}{\frac{\partial e_{ij}}{\partial M_{ij}}\frac{\partial M_{ij}}{\partial\left( {p_{i},q_{i}} \right)}}}$

minimizing said global error function, where p_(j)=the vector for camera internal parameters for each image j, and q_(j)=the camera orientation with respect to a common reference frame for each image j.
 38. The invention according to claim 37, further comprising the steps of: re-initializing said projective transformation, in an iterative manner, with said output data generated by said calibration and global optimization module.
 39. The method according to claim 27, wherein: said step of blending comprises blending high frequency components of said images that overlap over a smaller region in the area of overlap than low frequency components of said images.
 40. The invention according to claim 39, wherein said blending for high frequency components of said images is performed over said smaller region on the order of 3-5 pixels.
 41. The invention according to claim 27, wherein said steps further comprising: wherein said blending of said rectilinear images to create a panorama comprises the steps of: constructing a Laplacian pyramid for the overlapping images in an image overlap region where said images overlap, said Laplacian pyramids having a plurality of levels; determining the coarsest level resolution level of the Laplacian pyramids for each of said images; constructing a blend mask from the image overlap region for said plurality of overlapping images, said blend mask being a Gaussian pyramid combining said Laplacian pyramid and said Gaussian pyramids to blend said images in said image overlap region.
 42. The method according to claim 41, wherein said step of constructing said blend mask is performed by locating the boundary of said blend mask by performing a grassfire transform on at least two overlapping images.
 43. The invention according to claim 41, further comprising the steps of: labeling, during the steps of blending, the pixels comprising each said overlapping images with values to associate each pixel with a particular image; generating a blend mask from the image overlap region of said images, and computing a boundary to said blend mask from said values of said pixel labels and from said overlapping images.
 44. The invention according to claim 41, wherein said blending function module generating at least one panorama from said output of said pairwise registration module and said calibration and global optimization module by employing in the image overlap areas of said output a multi-resolution weighted average blending.
 45. The invention according to claim 27, further comprising the steps of: projecting said panorama from said images, after said images have been pairwise registered, calibrated and globally optimized; projecting said panorama onto a view surface geometry that is selected from geometries consisting of: cubic, polyhedral, cylindrical and spherical geometries, frusto-conical cones joined at their base with the apexes pointing away from one another; any quadric surface, and geometries using the following projections: equidistant, equiangular, ellipsoid, Mercator, transverse Mercator, Oblique Mercator, cylindrical equal-area, Miller cylindrical, equidistant cylindrical, Cassini, Albers equal-area, Lambert conformal conic, equidistant conic, bipolar oblique conic conformal, polyconic, Bonne, azimuthal, orthographic, sterographic, gnomonic, general perspective, Lambert azimuthal equal-area, azimuthal equidistant, modified-stereographic conformal, space map projections, space oblique Mercator, satellite-tracking projections, pseudocylindrical projections, Van der Grinten, sinusoidal, Mollweide and Eckert IV and VI projections.
 46. A computer readable memory storing a program which executes the steps of: storing at least a pair of rectilinear images in a computer memory; and performing pairwise registration of said rectilinear images by calculating a projective transformation between said rectilinear images, the projective transformation includes a projective matrix, the matrix being a function of image center position, said pairwise registration function module generating a Hessian matrix.
 47. The method according to claim 46, wherein: said step of performing pairwise registration of said rectilinear images by calculating said projective transformation between said rectilinear images comprises the steps of: initializing said projective transformation with camera internal and external parameters of a pair of said rectilinear images that overlap; forming a Gaussian pyramid from said pair of overlapping rectilinear images; perturbing said overlapping rectilinear images until a local registration error function is minimized at a first level of said Gaussian pyramid for said images.
 48. The method according to claim 47, wherein: wherein said camera internal and external parameters are selected from the group comprising the image center position of each of said pairs of images, aspect ratio of said pixels comprising said images, the focal length of the camera which took said images; the camera orientation with respect to a common reference frame, camera pan, tilt, roll and skew and brightness and contrast of said pairs of images.
 49. The method according to claim 47, wherein: said local registration error function, eij, is given by the equation: $e_{ij} = {\frac{1}{A_{ij}}{\sum\limits_{overlap}\left( {{s_{ij}{I_{j}\left( X_{j} \right)}} + b_{ij} - {I_{i}\left( {M_{ij}X_{j}} \right)}} \right)^{2}}}$

where s_(ij) and b_(ij), the exposure parameters, represent the exposure difference, I_(i)( ) and I_(j)( ) are pixel intensity values from two images, and A_(ij) is the overlap area of said images, the vector X_(i) represents the homogeneous coordinates of the pixel locations making up said images, and the matrix M_(ij) represents the matrix that transforms coordinates from image j to image i; further comprising the step of pairwise registration of said overlapping images on successive iterations of said Gaussian pyramid.
 50. The method according to claim 49, further comprising the step of: attenuating said estimated exposure parameters, sij and bij, in said equation, at each successive iteration of said Gaussian pyramid by progressive damping, said damping set to maximum at the coarsest level of said Gaussian pyramid and decreasing to zero at the finest level of said Gaussian pyramid.
 51. The method according to claim 50, further comprising the step of: estimating said exposure parameters, sij and bij, according to a correlation based linear search.
 52. The method according to claim 49, further comprising the step of: finding said first level of said Gaussian pyramid by iteratively moving down said Gaussian pyramid until a predetermined number of pixels from each of said images overlap.
 53. The method according to claim 52, further comprising the step of: determining the number of levels of said Gaussian pyramid of said pairwise registration of overlapping images according to the formula: $\log_{2}\left( \frac{l}{l_{\min}} \right)$

where I is the square root of the smaller eigenvalue of the 2×2 inertial tensor of the overlap polygon region of said plurality of images, and I_(min) is the minimal size of the finest level resolution pyramid level.
 54. A computer system comprising: a memory storing data representations relating to at least two images; function modules in said memory; a processor for processing instructions and data from said memory and said function modules; and a pairwise registration function module in said memory, and operating said processor for pairwise registration of said images, said pairwise registration function module generating output data related to said pairwise registration of said images, the pairwise registration function module including a projective matrix, wherein the projective matrix is a function of image center position, said output data including a Hessian matrix.
 55. The invention according to claim 54, wherein: said pairwise registration function module operates said processor to register a plurality of each of said images that overlap with one another, by perturbing said images.
 56. The invention according to claim 55, wherein: said pairwise registration function module performs said pairwise registration by estimating a projective transformation relating a pair of images that overlap.
 57. The invention according to claim 56, wherein: said projective transformation between said pair of images is estimated by said pairwise registration function module by performing a gradient-based optimization that minimizes a local error function that is comprised of the differences in exposures between pixels comprising pairs of overlapping images, and contains a projective matrix initialized by camera internal and external parameters relating to said plurality of images.
 58. The invention according to claim 57 wherein: said local error function, eij, is given by the equation $e_{ij} = {\frac{1}{A_{ij}}{\sum\limits_{overlap}\left( {{s_{ij}{I_{j}\left( X_{j} \right)}} + b_{ij} - {I_{i}\left( {M_{ij}X_{j}} \right)}} \right)^{2}}}$

where s_(ij) and b_(ij), the exposure parameters, represent the exposure difference, I_(i)( ) and I_(j)( ) are pixel intensity values from two images, and A_(ij) is the overlap area of said images, the vector X_(i) represents the homogeneous coordinates of the pixel locations making up said images, and the matrix M_(ij) represents the matrix that transforms coordinates from image j to image i, and; said pairwise registration function module operates said processor to form a Gaussian pyramid in said memory from said plurality of overlapping images, said Gaussian pyramid having a plurality of levels, each subsequent level being finer than each preceding level, said optimization of said local error function is performed on progressively finer levels of said Gaussian pyramid.
 59. The invention according to claim 58, wherein: the number of pyramid levels of said Gaussian pyramid is computed by said pairwise registration function module according to the formula: $\log_{2}\left( \frac{l}{l_{\min}} \right)$

where I is the square root of the smaller eigenvalue of the 2×2 inertial tensor of the overlap polygon region of said plurality of images, and I_(min) is the minimal size of the finest level resolution pyramid level.
 60. The invention according to claim 58, wherein: said pairwise registration function module operates said processor to estimate said exposure parameters, s_(ij) and b_(ij), of said local error function by a correlation-based linear search, and attenuates said exposure parameters with progressive damping, said progressive damping set to maximum at the coarsest level of said pyramid and decreasing to zero at the finest level.
 61. The invention according to claim 56, further comprising: a user interface module in said memory and operating said processor for initializing said projective transformation of said pairwise registration function module, said user interface module operating to process input from a user of the computer system, wherein said projective transformation is initialized with said camera internal and external parameters from manual input by a user.
 62. The invention according to claim 61, wherein: said internal and external parameters are selected from the group comprising: image center position of each of said pairs of images, aspect ratio of said pixels comprising said images, the focal length of the camera which took said images; the camera orientation with respect to a common reference frame, camera pan, tilt, roll and skew and brightness and contrast of said pairs of images.
 63. The invention according to claim 61, wherein: said user interface module allows the user the ability to select the arrangement of said images.
 64. The invention according to claim 63, wherein: said user interface module comprises a virtual reality environment comprising a spherical coffee table.
 65. The invention according to claim 64, wherein: said user interface module allows the user to select the arrangement of said images from a plurality of rows of photos on said spherical coffee table.
 66. The invention according to claim 56, wherein: a calibration and global optimization function module in said memory and operating said processor for calibration and global optimization of said output data of said pairwise registration module, said calibration and global optimization module generating output data related to said calibration and global optimization of all of said overlapping images.
 67. The invention according to claim 66, wherein: wherein said calibration and global optimization function module calibrates and optimizes said output data of said pairwise registration module by approximating a local error function.
 68. The invention according to claim 67, wherein said approximation of said local error function is a Taylor Series expansion given by the formula:  e _(ij)(M _(ij))≈e _(ij) ⁰+(M _(ij) −M _(ij) ⁰)^(T) C _(ij)(M _(ij) −M _(ij) ⁰) where e_(ij) ⁰ is a constant representing the minimal value achieved by said pairwise registration function module; M_(ij) is the projective matrix of overlapping pairs of images, M_(ij) ⁰ is the vector representing the optimal projective matrix, and C_(ij) is the Hessian matrix obtained by the pairwise registration function module when optimizing objective function e_(ij).
 69. The invention according to claim 67, wherein said calibration and global optimization function module calculates a global error function for all overlapping images by application of the chain rule to said output data of said pairwise registration module, according to the formula: $\frac{\partial E}{\partial\left( {p_{i},q_{i}} \right)} = {\sum\limits_{j}{\frac{\partial e_{ij}}{\partial M_{ij}}\frac{\partial M_{ij}}{\partial\left( {p_{i},q_{i}} \right)}}}$

and minimizes said global error function, where p_(j)=the vector for camera internal parameters for each image j, and q_(j)=the camera orientation with respect to a common reference frame for each image j.
 70. The invention according to claim 66, wherein: said projective transformation initialized by camera internal and external parameters relating to said plurality of images in said pairwise registration function is initialized by said output data generated by said calibration and global optimization module generating output data, in an iterative manner.
 71. The invention according to claim 70, wherein: said calibration and global optimization function module attenuates camera internal parameters during said calibration and global optimization.
 72. The invention according to claim 66, further comprising: a blending function module in said memory and operating said processor for generating at least one panorama from said output data from said pairwise registration module and said calibration and global optimization module.
 73. The invention according to claim 72, wherein: said blending function module generating at least one panorama from said output of said pairwise registration module and said calibration and global optimization module by employing in the image overlap areas of said output a multi-resolution weighted average blending.
 74. The invention according to claim 73, further comprising: a user interface module in said memory and operating said processor for accepting input from a human user, and for selecting said images and adjusting the areas said images overlap; said blending function module generating at least one panorama from said output of said pairwise registration module and said calibration and global optimization module by employing in the image overlap areas of said output a weighted average blending, in response to said user interface module.
 75. The invention according to claim 73, further comprising: a user interface module in said memory and operating said processor for accepting input from a human user, and for selecting said images and adjusting the areas said images overlap, wherein said user interface module allows the user the ability to select the arrangement of said images.
 76. The invention according to claim 75, wherein: said user interface module comprises a virtual reality environment comprising a spherical coffee table.
 77. The invention according to claim 76, wherein: said user interface module allows the user to select the arrangement of said images from a plurality of rows of photos.
 78. The invention according to claim 73, wherein: said blending function module generates said panorama from said output data comprising images having image overlap regions, said image overlap regions blended by said panorama generating function module by performing a grassfire transform on data relating to said images to generate a blend mask of said images.
 79. The invention according to claim 73, wherein said blending function module blends high frequency components of said images that overlap over a smaller region in the area of overlap than low frequency components of said images.
 80. The invention according to claim 79, wherein said smaller region is on the order of 3-5 pixels.
 81. The invention according to claim 73, wherein: said blending function module generates said panorama from said output data comprising images having image overlap regions, said blending function module blending by instructing said processor to construct Laplacian pyramids stored in said memory for each plurality of images that overlap in said image overlap regions, said Laplacian pyramids having a plurality of levels, said blending function module determining the coarsest level resolution level of the Laplacian pyramids for each of said images, said blending function module generating a blend mask from the image overlap region of said plurality of images, said blending function module constructing a Gaussian pyramid from said blend mask for each said plurality of images, and blending said images by multiplying said Laplacian and Gaussian pyramid values for every level of said Laplacian pyramids for every said plurality of images.
 82. The invention according to claim 73, wherein: said blending function labels the pixels comprising each said overlapping images with values to associate each pixel with a particular image, said blending function module generating a blend mask from the image overlap region of said images, and computing a boundary to said blend mask from said values of said pixel labels and from said overlapping images.
 83. The invention according to claim 73, further comprising: a projection function module in said memory and operating said processor for forming a panorama from said images, said projection function forms said panorama on a geometry that is selected from geometries consisting of: cubic, polyhedral, cylindrical and spherical geometries, frusto-conical cones joined at their base with the apexes pointing away from one another; any quadric surface, and geometries using the following projections: equidistant, equiangular, ellipsoid, Mercator, transverse Mercator, Oblique Mercator, cylindrical equal-area, Miller cylindrical, equidistant cylindrical, Cassini, Albers equal-area, Lambert conformal conic, equidistant conic, bipolar oblique conic conformal, polyconic, Bonne, azimuthal, orthographic, sterographic, gnomonic, general perspective, Lambert azimuthal equal-area, azimuthal equidistant, modified-stereographic conformal, space map projections, space oblique Mercator, satellite-tracking projections, pseudocylindrical projections, Van der Grinten, sinusoidal, Mollweide and Eckert IV and VI projections.
 84. An apparatus for generating a panorama comprising: means for pairwise registration of images having overlapping regions; means for calibration and global optimization of said images; means for blending said images after pairwise registration, calibration and global optimization of said images; said pairwise registration function module including a projective matrix, wherein the projective matrix is a function of image center position; and means for projecting said blended images into a panorama.
 85. The invention according to claim 84, wherein: said pairwise registration means operates said processor to register a plurality of each of said images that overlap with one another, through perturbation of said images.
 86. The invention according to claim 85, wherein: said pairwise registration means estimates a projective transformation between a pair of images by performing a gradient-based optimization that minimizes a local error function.
 87. The invention according to claim 86, further comprising: a user interface module in said memory and operating said processor for initializing said projective matrix of said pairwise registration means, said user interface module operating to process input from a user of the computer system, wherein said projective matrix is initialized with said camera internal and external parameters from manual input by a user; and the local error function of said pairwise registration means is comprised of the differences in exposures between pixels comprising the pairs of images.
 88. The invention according to claim 87, wherein: said projective transformation contains a projective matrix parametrized by said internal and external parameters, selected from the group comprising: image center position of each of said pairs of images, aspect ratio of said pixels comprising said images, the focal length of the camera which took said images; the camera orientation with respect to a common reference frame, camera pan, tilt, roll and skew and brightness and contrast of said pairs of images, and, said projective transformation is initialized by camera internal and external parameters relating to the plurality of images.
 89. The invention according to claim 86, wherein: said local error function, eij, is given by the equation $e_{ij} = {\frac{1}{A_{ij}}{\sum\limits_{overlap}\left( {{s_{ij}{I_{j}\left( X_{j} \right)}} + b_{ij} - {I_{i}\left( {M_{ij}X_{j}} \right)}} \right)^{2}}}$

where s_(ij) and b_(ij), the exposure parameters, represent the exposure difference, I_(i)( ) and I_(j)( ) are pixel intensity values from two images, and A_(ij) is the overlap area of said images, the vector X_(i) represents the homogeneous coordinates of the pixel locations making up said images, and the matrix M_(ij) represents the matrix that transforms coordinates from image j to image i.
 90. The invention according to claim 89, wherein: said pairwise registration means operates said processor to form a Gaussian pyramid in said memory from said plurality of overlapping images, said Gaussian pyramid having a plurality of levels, each subsequent level being finer than each preceding level, said optimization of said local error function is performed on progressively finer levels of said Gaussian pyramid.
 91. The invention according to claim 90, wherein: the number of pyramid levels of said Gaussian pyramid is computed by said pairwise registration means according to the formula: $\log_{2}\left( \frac{l}{l_{\min}} \right)$

where I is the square root of the smaller eigenvalue of the 2×2 inertial tensor of the overlap polygon region of said plurality of images, and I_(min) is the minimal size of the finest level resolution pyramid level.
 92. The invention according to claim 90, wherein: said pairwise registration means operates said processor to estimate said exposure parameters, s_(ij) and b_(ij), of said local error function by a correlation-based linear search, and attenuates said exposure parameters with progressive damping, said progressive damping set to maximum at the coarsest level of said pyramid and decreasing to zero at the finest level.
 93. The invention according to claim 86, wherein: a calibration and global optimization means in said memory and operating said processor for calibration and global optimization of said output data of said pairwise registration module, said calibration and global optimization module generating output data related to said calibration and global optimization of all of said overlapping images.
 94. The invention according to claim 93, wherein: wherein said calibration and global optimization means calibrates and optimizes said output data of said pairwise registration module by approximating said local error function, eij.
 95. The invention according to claim 94, wherein said approximation of said local error function is a Taylor Series expansion given by the formula: e _(ij)(M _(ij))≈e _(ij) ⁰+(M _(ij) −M _(ij) ⁰)^(T) C _(ij)(M _(ij) −M _(ij) ⁰) where e_(ij) ⁰ is a constant representing the minimal value achieved by said pairwise registration means; M_(ij) is the projective matrix of overlapping pairs of images, M_(ij) ⁰ is the vector representing the optimal projective matrix, and C_(ij) is the Hessian matrix obtained by the pairwise registration means when optimizing objective function e_(ij).
 96. The invention according to claim 94, wherein said calibration and global optimization means calculates a global error function for all overlapping images by application of the chain rule to said output data of said pairwise registration module, according to the formula: $\frac{\partial E}{\partial\left( {p_{i},q_{i}} \right)} = {\sum\limits_{j}{\frac{\partial e_{ij}}{\partial M_{ij}}\frac{\partial M_{ij}}{\partial\left( {p_{i},q_{i}} \right)}}}$

and minimizes said global error function, where p_(j)=the vector for camera internal parameters for each image j, and q_(j)=the camera orientation with respect to a common reference frame for each image j.
 97. The invention according to claim 93, wherein: said projective transformation is initialized by camera internal and external parameters relating to said plurality of images in said pairwise registration function, said initialization is by said output data generated by said calibration and global optimization module, and said initialization is performed by said calibration and global optimization module in an iterative manner.
 98. The invention according to claim 97, wherein: said calibration and global optimization means attenuates camera internal parameters during said calibration and global optimization.
 99. The invention according to claim 93, further comprising: a blending means in said memory and operating said processor for generating at least one panorama from said output data from said pairwise registration module and said calibration and global optimization module.
 100. The invention according to claim 99, wherein: said blending means generating at least one panorama from said output of said pairwise registration module and said calibration and global optimization module by employing in the image overlap areas of said output a multi-resolution weighted average blending.
 101. The invention according to claim 100, further comprising: a user interface module in said memory and operating said processor for accepting input from a human user, and for selecting said images and adjusting the areas said images overlap.
 102. The invention according to claim 100, further comprising: a projecting means in said memory and operating said processor for forming a panorama from said images, said projection function forms said panorama on a geometry that is selected from geometries consisting of: cubic, polyhedral, cylindrical and spherical geometries, frusto-conical cones joined at their base with the apexes pointing away from one another; any quadric surface, and geometries using the following projections: equidistant, equiangular, ellipsoid, Mercator, transverse Mercator, Oblique Mercator, cylindrical equal-area, Miller cylindrical, equidistant cylindrical, Cassini, Albers equal-area, Lambert conformal conic, equidistant conic, bipolar oblique conic conformal, polyconic, Bonne, azimuthal, orthographic, sterographic, gnomonic, general perspective, Lambert azimuthal equal-area, azimuthal equidistant, modified-stereographic conformal, space map projections, space oblique Mercator, satellite-tracking projections, pseudocylindrical projections, Van der Grinten, sinusoidal, Mollweide and Eckert IV and VI projections.
 103. The invention according to claim 100, wherein: said blending means generates said panorama from said output data comprising images having image overlap regions, said image overlap regions blended by said panorama generating means by performing a grassfire transform on data relating to said images to generate a mask of said images.
 104. The invention according to claim 100, wherein: said blending means generates said panorama from said output data comprising images having image overlap regions, said blending means blending by instructing said processor to construct Laplacian pyramids stored in said memory for each plurality of images that overlap in said image overlap regions, said Laplacian pyramids having a plurality of levels, said blending means determining the coarsest level resolution level of the Laplacian pyramids for each of said images, said blending means generating a blend mask from the image overlap region of said plurality of images, said blending means constructing a Gaussian pyramid from said blend mask for each said plurality of images, and blending said images by multiplying said Laplacian and Gaussian pyramid values for every level of said Laplacian pyramids for every said plurality of images.
 105. The invention according to claim 100, wherein: said blending function labels the pixels comprising each said overlapping images with values to associate each pixel with a particular image, said blending means generating a blend mask from the image overlap region of said images, and computing a boundary to said blend mask from said values of said pixel labels and from said overlapping images.
 106. A computer system for authoring panoramas, comprising: memory storing data representations of a plurality of images; I/O for inputting and outputting data; function modules in said memory; a processor cooperating with said memory and I/O for processing instructions and data from said memory, said I/O and said function modules; a pairwise registration function module in said memory and operating said processor for pairwise registration of said images, said pairwise registration function module generating output data related to said pairwise registration of said images; a calibration and global optimization function module in said memory and operating said processor for calibration and global optimization of said output data of said pairwise registration module, said calibration and global optimization module generating output data related to said calibration and global optimization of said images; a blending function module in said memory and operating said processor for generating at least one panorama from said output data from said pairwise registration module and said calibration and global optimization module; wherein said blending function module generates said panorama from said output data comprising images having image overlap regions, said image overlap regions blended by said panorama generating function module by performing a grassfire transform on data relating to said images to generate a blend mask of said image overlap regions; and a projection function module in said memory and operating said processor for forming a panorama from said images.
 107. In a computer having a processor which executes instructions stored in memory, a method for generating panoramas comprising the steps of: storing at least two rectilinear images in a computer memory; generating image output data by performing pairwise registration of said rectilinear images as an estimate to a projective transformation relating to said rectilinear images; generating image output data by calibration and global optimization of said rectilinear images from image output data from said pairwise registration; blending said rectilinear images to create a panorama from said generated image output data from said pairwise registration and said calibration and global optimization; and projecting said panorama formed from said steps of pairwise registration and calibration and global optimization, wherein said projection function module forms said panorama on a geometry that is selected from geometries consisting of: cubic, polyhedral, cylindrical and spherical geometries, frusto-conical cones joined at their base with the apexes pointing away from one another; all geometries employing conical sections, and geometries using the following projections: equidistant, equiangular, ellipsoid, Mercator, transverse Mercator, Oblique Mercator, cylindrical equal-area, Miller cylindrical, equidistant cylindrical, Cassini, Albers equal-area, Lambert conformal conic, equidistant conic, bipolar oblique conic conformal, polyconic, Bonne, azimuthal, orthographic, sterographic, gnomonic, general perspective, Lambert azimuthal equal-area, azimuthal equidistant, modified-stereographic conformal, space map projections, space oblique Mercator, satellite-tracking projections, pseudocylindrical projections, Van der Grinten, sinusoidal, Mollweide and Eckert IV and VI projections.
 108. A computer system comprising: a memory storing data representations relating to at least two images; function modules in said memory; a processor for processing instructions and data from said memory and said function modules; and a pairwise registration function module in said memory, and operating said processor for pairwise registration of said images, said pairwise registration function module generating output data, related to said pairwise registration of said images, for use in a global optimization function module, said output data including a Hessian matrix. 